package com.ler.yrmall.product.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ler.yrmall.product.vo.AttrAttrgroupRelationVO;
import com.ler.yrmall.basic.Form;
import com.ler.yrmall.product.mapper.AttrAttrgroupRelationMapper;
import com.ler.yrmall.product.entity.AttrAttrGroupRelationEntity;
import com.ler.yrmall.product.service.AttrAttrgroupRelationService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;


/**
 * @author leron
 */
@Service
public class AttrAttrgroupRelationServiceImpl extends ServiceImpl<AttrAttrgroupRelationMapper, AttrAttrGroupRelationEntity> implements AttrAttrgroupRelationService {

    @Override
    public IPage<AttrAttrgroupRelationVO> queryPage(Form request) {
        Page<AttrAttrGroupRelationEntity> page = new Page<>();
        return this.page(page).convert(item -> {
            AttrAttrgroupRelationVO target = new AttrAttrgroupRelationVO();
            BeanUtils.copyProperties(item,target);
            return target;
        });
    }
}


